home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / ftn / lrectr.z / lrectr
Encoding:
Text File  |  2002-10-03  |  6.7 KB  |  199 lines

  1.  
  2.  
  3.  
  4. llllrrrreeeeccccttttrrrr((((3333GGGG))))                                                          llllrrrreeeeccccttttrrrr((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      rrrreeeeccccttttrrrreeee,,,, llllrrrreeeeccccttttrrrr - reads a rectangular array of pixels into CPU memory
  10.  
  11. FFFFOOOORRRRTTTTRRRRAAAANNNN 77777777 SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  12.      iiiinnnntttteeeeggggeeeerrrr****4444 rrrreeeeccccttttrrrreeee((((xxxx1111,,,, yyyy1111,,,, xxxx2222,,,, yyyy2222,,,, ppppaaaarrrrrrrraaaayyyy))))
  13.      iiiinnnntttteeeeggggeeeerrrr****4444 xxxx1111,,,, yyyy1111,,,, xxxx2222,,,, yyyy2222
  14.      iiiinnnntttteeeeggggeeeerrrr****2222 ppppaaaarrrrrrrraaaayyyy((((****))))
  15.  
  16.      iiiinnnntttteeeeggggeeeerrrr****4444 llllrrrreeeeccccttttrrrr((((xxxx1111,,,, yyyy1111,,,, xxxx2222,,,, yyyy2222,,,, ppppaaaarrrrrrrraaaayyyy))))
  17.      iiiinnnntttteeeeggggeeeerrrr****4444 xxxx1111,,,, yyyy1111,,,, xxxx2222,,,, yyyy2222
  18.      iiiinnnntttteeeeggggeeeerrrr****4444 ppppaaaarrrrrrrraaaayyyy((((****))))
  19.  
  20. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  21.      _x_1       expects the x coordinate of the lower-left corner of the
  22.               rectangle that you want to read.
  23.  
  24.      _y_1       expects the y coordinate of the lower-left corner of the
  25.               rectangle that you want to read.
  26.  
  27.      _x_2       expects the x coordinate of the upper-right corner of the
  28.               rectangle that you want to read.
  29.  
  30.      _y_2       expects the y coordinate of the upper-right corner of the
  31.               rectangle that you want to read.
  32.  
  33.      _p_a_r_r_a_y   expects the array to receive the pixels that you want to read.
  34.  
  35. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  36.      The returned value of this function is the number of pixels specified in
  37.      the rectangular region, regardless of whether the pixels were actually
  38.      readable (i.e. on-screen) or not.
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. llllrrrreeeeccccttttrrrr((((3333GGGG))))                                                          llllrrrreeeeccccttttrrrr((((3333GGGG))))
  71.  
  72.  
  73.  
  74. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  75.      rrrreeeeccccttttrrrreeee and llllrrrreeeeccccttttrrrr read the pixel values of a rectangular region of the
  76.      screen and write them to the array, _p_a_r_r_a_y. The system fills the elements
  77.      of _p_a_r_r_a_y from left-to-right, then bottom-to-top.  All coordinates are
  78.      relative to the lower-left corner of the window, not the screen or
  79.      viewport.
  80.  
  81.      Pixels are read from the currently active framebuffer, as specified by
  82.      ddddrrrraaaawwwwmmmmoooo....  Thus, to read pixel values from the overlay bitplanes, for
  83.      example, simply set ddddrrrraaaawwwwmmmmoooo to OOOOVVVVEEEERRRRDDDDRRRR.  Use rrrreeeeaaaaddddssssoooo to specify the pixel
  84.      source within the current framebuffer (backbuffer, frontbuffer, or z-
  85.      buffer, for example) from which both rrrreeeeccccttttrrrreeee and llllrrrreeeeccccttttrrrr take pixel values.
  86.  
  87.      rrrreeeeccccttttrrrreeee fills an array of 16-bit words, and therefore should be used only
  88.      to read color index values.  llllrrrreeeeccccttttrrrr fills an array of 32-bit words.
  89.      Based on the current ppppiiiixxxxmmmmoooodddd, llllrrrreeeeccccttttrrrr can return pixels of 1, 2, 4, 8, 12,
  90.      16, 24, or 32 bits each.  Use llllrrrreeeeccccttttrrrr to read packed RGB or RGBA values,
  91.      color index values, or _z values.
  92.  
  93.      ppppiiiixxxxmmmmoooodddd greatly affects the operation of llllrrrreeeeccccttttrrrr, and has no effect on the
  94.      operation of rrrreeeeccccttttrrrreeee.  By default, llllrrrreeeeccccttttrrrr returns 32-bit pixels in the
  95.      format used by ccccppppaaaacccckkkk.  Different pixel sizes, framebuffer shifts, scan
  96.      patterns through the framebuffer, and offsets through memory, can all be
  97.      specified using ppppiiiixxxxmmmmoooodddd
  98.  
  99.      rrrreeeeccccttttrrrreeee and llllrrrreeeeccccttttrrrr leave the current character position unpredictable.
  100.  
  101. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  102.      cpack, drawmo, lrectw, pixmod, readso
  103.  
  104. NNNNOOOOTTTTEEEESSSS
  105.      These routines are available only in immediate mode.
  106.  
  107.      On IRIS-4D GT and GTX models, returned bits that do not correspond to
  108.      valid bitplanes are undefined.  Other models return zero in these bits.
  109.  
  110.      On IRIS-4D GT, GTX, XS, XS24, XZ, Elan, Extreme and VGX models, rrrreeeeccccttttrrrreeee
  111.      performance will suffer if _x_2 - _x_1 + 1 is odd, or if _p_a_r_r_a_y is not 32-bit
  112.      word aligned.
  113.  
  114.      Due to the write-back nature of the R4000 cache, sproc/m_fork processes
  115.      should avoid accesses to cache lines (128 Bytes) to which a pixel read is
  116.      currently in progress.
  117.  
  118.      The size of the array passed to llllrrrreeeeccccttttrrrr is limited to the size of the
  119.      screen.
  120.  
  121. BBBBUUUUGGGGSSSS
  122.      On IRIS-4D GT and GTX models, when reading pixels from the PUPMODE
  123.      planes, the returned bits are shifted up by two bits.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. llllrrrreeeeccccttttrrrr((((3333GGGG))))                                                          llllrrrreeeeccccttttrrrr((((3333GGGG))))
  137.  
  138.  
  139.  
  140.      IRIS-4D VGX and VGXT require that both |x2-x1+1| and |y2-y1+1| be less
  141.      than 2048.
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.